package com.ytrsoft.entity;

import com.ytrsoft.enums.Theme;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.*;

@Schema(description = "设置类")
@Entity
public class Setting extends BaseEntity {

    @Schema(description = "关联用户")
    @OneToOne
    @JoinColumn(name = "user_id", nullable = false, unique = true)
    private User user;

    @Schema(description = "主题颜色")
    @Enumerated(EnumType.STRING)
    private Theme theme = Theme.CRIMSON;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Theme getTheme() {
        return theme;
    }

    public void setTheme(Theme theme) {
        this.theme = theme;
    }
}
